﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TomNet.Entity
{
    public static class ApiResultCode
    {
        /* 成功状态码 */
        public const int Success = 0;

        /* 参数错误：10001-19999 */

        /// <summary>
        /// 参数缺失
        /// </summary>
        public const int MissingParameter = 10001;

        /// <summary>
        /// 参数验证失败
        /// </summary>
        public const int InvalidParamater = 10002;


        /* 用户错误：20001-29999 */

        /// <summary>
        /// 用户未登录
        /// </summary>
        public const int UserNotLoggedIn = 20001;

        /// <summary>
        /// 账号或密码错误
        /// </summary>
        public const int UserLoginError = 20002;

        /// <summary>
        /// 账号被禁用
        /// </summary>
        public const int UserLocked = 20003;

        /// <summary>
        /// 账号不存在
        /// </summary>
        public const int UserNotExist = 20004;

        /// <summary>
        /// 账号已存在
        /// </summary>
        public const int UserExisted = 20005;


        /* 业务错误：30001-39999 */

        /// <summary>
        /// 业务异常
        /// </summary>
        public const int BusinessException = 30001;


        /* 系统错误：40001-49999 */

        /// <summary>
        /// 系统内部错误
        /// </summary>
        public const int SystemInnerError = 40001;

        /// <summary>
        /// 系统繁忙
        /// </summary>
        public const int SystemIsBusy = 40002;

        /* 数据错误：50001-599999 */

        /// <summary>
        /// 数据未找到
        /// </summary>
        public const int DataNotFound = 50001;

        /// <summary>
        /// 数据有误
        /// </summary>
        public const int DataError = 50001;

        /// <summary>
        /// 数据已存在
        /// </summary>
        public const int DataExised = 50003;

        /* 接口错误：60001-69999 */

        /// <summary>
        /// 内部接口调用异常
        /// </summary>
        public const int InterfaceInnerError = 60001;

        /// <summary>
        /// 外部接口调用异常
        /// </summary>
        public const int InterfaceOutterError = 60002;

        /// <summary>
        /// 接口禁止访问
        /// </summary>
        public const int InterfaceForbidden = 60003;

        /// <summary>
        /// 接口地址无效
        /// </summary>
        public const int InterfaceAddrInvalid = 60004;

        /// <summary>
        /// 接口请求超时
        /// </summary>
        public const int InterfaceRequestTimeout = 60005;

        /// <summary>
        /// 接口繁忙
        /// </summary>
        public const int InterfaceIsBusy = 60007;

        /* 权限错误：70001-79999 */

        /// <summary>
        /// 无权访问
        /// </summary>
        public const int PermissionNoAccess = 70001;

    }
}
